// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import com.nnee.p_b.p_a.cls_d;
import com.nnee.p_fk.p_a.cls_a;
import com.nnee.p_fk.p_a.cls_l;
import com.nnee.p_pr.p_app.cls_PrisApp;
import com.nnee.p_pr.p_offline.c;
import com.nnee.p_pr.p_offline.e;
import java.util.Iterator;
import java.util.LinkedList;

// Referenced classes of package com.nnee.p_pr.p_activity:
//            em

public class cls_PRISServiceOfflineDownload extends Service
    implements cls_e
{

    public cls_PRISServiceOfflineDownload()
    {
        b = true;
        c = null;
        d = new LinkedList();
        g = new em(this);
    }

    public int a(int i, Object obj)
    {
        if(d == null)
            break MISSING_BLOCK_LABEL_76;
        LinkedList linkedlist = d;
        linkedlist;
        JVM INSTR monitorenter ;
        for(Iterator iterator = d.iterator(); iterator.hasNext(); ((e)iterator.next()).a(i, obj));
        break MISSING_BLOCK_LABEL_61;
        Exception exception;
        exception;
        throw exception;
        linkedlist;
        JVM INSTR monitorexit ;
        if(i != 1)
        {
            b();
            stopSelf();
        }
        return 0;
    }

    public void a()
    {
        if(c != null)
        {
            c.e();
            c = null;
        }
        String s = com.nnee.p_b.p_a.cls_d.h().c();
        String s1 = com.nnee.p_b.p_a.cls_d.h().d();
        LinkedList linkedlist = com.nnee.p_pr.c.c.f(cls_PrisApp.a(), s);
        if(linkedlist != null && linkedlist.size() == 0)
        {
            stopSelf();
        } else
        {
            c = com.nnee.p_pr.p_offline.c.a(linkedlist, s, s1);
            c.a(this);
            if(f == null)
                f = new cls_a(4, 1);
            if(e == null)
            {
                e = new com.nnee.p_fk.b.c(1, 2);
                e.a(new cls_l(e, f));
            }
            e.a(c);
        }
    }

    public void a(cls_e e1)
    {
        if(d != null)
            d.add(e1);
    }

    public void b()
    {
        if(c != null)
            c.e();
        if(f != null)
        {
            f.a();
            f = null;
        }
        if(e != null)
        {
            e.b();
            e = null;
        }
    }

    public void b(cls_e e1)
    {
        if(d != null)
            d.remove(e1);
    }

    public boolean c()
    {
        boolean flag;
        if(c != null && !c.o())
            flag = true;
        else
            flag = false;
        return flag;
    }

    public IBinder onBind(Intent intent)
    {
        return g;
    }

    public void onCreate()
    {
        super.onCreate();
    }

    public void onDestroy()
    {
        super.onDestroy();
    }

    public void onStart(Intent intent, int i)
    {
        super.onStart(intent, i);
    }

    public boolean onUnbind(Intent intent)
    {
        return super.onUnbind(intent);
    }

    static final String a = "cls_PRISServiceOfflineDownload";
    boolean b;
    c c;
    LinkedList d;
    com.nnee.p_fk.b.c e;
    a f;
    em g;
}
